﻿@{
    Layout = null;
}
<style type="text/css">
    ul {
        list-style: none;
        padding-left: 0px;
    }
    .uploadpic > li:first-child {
        background: url(/Content/img/camera-upload.png) no-repeat center;
    }
    .control-label {
        max-width: 130px;
    }
    .uploadpic > li {
        display: inline-block;
        position: relative;
        display: inline-block;
        border-radius: 4px;
        overflow: hidden;
        color: #1E88C7;
        text-decoration: none;
        text-indent: 0;
        line-height: 20px;
        height: 50px;
        width: 50px;
        margin-right: 10px;
    }
    .file {
        position: relative;
        display: inline-block;
        border-radius: 4px;
        overflow: hidden;
        color: #1E88C7;
        text-decoration: none;
        text-indent: 0;
        line-height: 20px;
        height: 50px;
        width: 50px;
    }
    .file input {
        position: absolute;
        right: 0;
        top: 0;
        opacity: 0;
        width: 50px;
        height: 50px;
    }
    #Logo {
        display: inline-block;
        width: 50px;
        height: 50px;
    }
</style>

<div class="panel-body" style="padding:0">
    <div class="panel panel-default">
        <div class="panel-heading"></div>
        <div class="panel-body">
            <div>
                <table id="merchantuserinfo"></table>
            </div>
        </div>
    </div>
</div>

<div id="toolbar" class="btn-group">
    <button id="btnAddMerchantDialog" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>添加</span></button>
    <button id="btnUpdateMerchantDialog" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>修改</span></button>
    <button id="btnYesJoinMarkDialog" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>营业</span></button>
    <button id="btnNoJoinMarkDialog" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>休息</span></button>
    <button id="btnDetailDialog" type="button" class="btn btn-primary"><span><i class="fa fa-book"></i>详情</span></button>
</div>

@*添加修改商户模型*@
<div class="modal fade" id="AddMerchantModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog" style="width:50%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title" id="HeadTitle">添加商户</h4>
            </div>
            <div class="modal-body">
                <form id="merchantOperation" method="post" class="form-horizontal">
                    <input type="hidden" id="Id" name="Id" />
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户名称:</span>
                            <input type="text" id="Name" name="Name" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">平台分类:</span>
                            <select id="PlatFormId" name="PlatFormId" class="selectpicker show-tick form-control" data-live-search="true"></select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户公告:</span>
                            <input type="text" id="Notice" name="Notice" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户电话:</span>
                            <input type="text" id="Phone" name="Phone" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户地址:</span>
                            <input type="text" id="Address" name="Address" class="form-control" />
                        </div>
                    </div>       
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">营业开始时间<span style="color:red">（10:00）:</span></span>
                            <input type="text" id="BusinessStartHours" name="BusinessStartHours" class="form-control" />
                            <span class="input-group-addon">结束时间<span style="color:red">（22:00）:</span></span>
                            <input type="text" id="BusinessEndHours" name="BusinessEndHours" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">配送费:</span>
                            <input type="text" id="DistributionFee" name="DistributionFee" class="form-control" value="0" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户Logo:</span>
                            <div class="col-sm-10 camera">
                                <ul class="uploadpic">
                                    <li>
                                        <a href="javascript:void(0);" class="file">
                                            <input type="file" id="file" name="file" class="btnupload" />
                                        </a>
                                    </li>
                                    <li>
                                        <img src="" id="Logo" />
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-reply"></i>取消</button>
                <button type="button" class="btn btn-primary" id="btnAddMerchantOK"><i class="fa fa-check"></i>确定</button>
            </div>
        </div>
    </div>
</div>

@* 营业休息模型 *@
<div class="modal fade" id="BusinessModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title">商户(<span id="merchantName">***</span>)是否营业管理</h4>
            </div>
            <div class="modal-body">
                <form id="businessOperation" method="post" class="form-horizontal">
                    <input type="hidden" id="merchant_id" name="merchant_id" />
                    <div class="form-group">
                        <div class="input-group">
                            您确认要<span id="merchantName_OK">***</span>吗？
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-reply"></i>取消</button>
                <button type="button" class="btn btn-primary" id="btnBusiness"><i class="fa fa-check"></i>确定</button>
            </div>
        </div>
    </div>
</div>

@*订单详情*@
<div class="modal fade" id="DetailModal" tabindex="-1" role="dialog" aria-hidden="true">
    <div class="modal-dialog" style="width:50%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times;</button>
                <h4 class="modal-title">订单信息详情</h4>
            </div>
            <div class="modal-body">
                <form id="MerchantDetail" class="form-horizontal">
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">用户名:</span>
                            <input type="text" id="detail_nickname" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">平台分类名称:</span>
                            <input type="text" id="detail_platformname" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户名称:</span>
                            <input type="text" id="detail_name" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">商户电话:</span>
                            <input type="text" id="detail_phone" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户营业开始时间:</span>
                            <input type="text" id="detail_businessstarthours" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">结束时间:</span>
                            <input type="text" id="detail_businesssendhours" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">营业:</span>
                            <input type="text" id="detail_joinmark" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">配送费:</span>
                            <input type="text" id="detail_distributionfee" readonly="readonly" class="form-control" />
                            <span class="input-group-addon">商户创建时间:</span>
                            <input type="text" id="detail_createtime" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户公告:</span>
                            <input type="text" id="detail_notice" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户地址:</span>
                            <input type="text" id="detail_address" readonly="readonly" class="form-control" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="input-group">
                            <span class="input-group-addon">商户Logo:</span>
                            <div style="float: left;border: 1px solid #CAC3C3;background: #FFFFFF;margin-left: 20px;box-shadow: 5px 5px 5px #777575;">
                                <img id="detail_logo" style="width:120px;height:80px" />
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<script src="~/Scripts/project/min/merchantuser.min.js"></script>
<script type="text/javascript">
    $(function () {
        ml.admin.merchantuser.init();
    })
</script>